package com.app.twth.ui.lpnphoto.lpn;


import com.app.twth.app.Constant;
import com.app.twth.base.BaseModel;
import com.app.twth.bean.BaseResponseEntity;
import com.app.twth.net.JsonCallBack;
import com.app.twth.utils.GsonUtil;
import com.lzy.okgo.OkGo;

import java.io.Serializable;

public class LPNPhotoLPNDataModel extends BaseModel {
    public <T> void getPutawayDetail(int id, JsonCallBack jsonCallBack) {
        OkGo.<BaseResponseEntity<T>>get(Constant.lpnPhotoOrderIbLpns + id)
                .tag(this)
                .execute(jsonCallBack);
    }

    public <T> void getLpnPhotoInfo(int id, String ibLpn, JsonCallBack jsonCallBack) {
        PhotoInfoQr photoInfoQr = new PhotoInfoQr();
        photoInfoQr.orderId = id;
        photoInfoQr.ibLpn = ibLpn;

        OkGo.<BaseResponseEntity<T>>post(Constant.lpnPhotoInfo)
                .tag(this)
                .upJson(GsonUtil.toJson(photoInfoQr))
                .execute(jsonCallBack);
    }

    class PhotoInfoQr implements Serializable {
        public int orderId;
        public String ibLpn;
    }

}